# -*- coding: utf-8 -*-
from datetime import date, timedelta
from dtcloud import _, api, fields, models
from dtcloud.exceptions import ValidationError


class bt_users_wizard(models.TransientModel):
    _name = 'bt.users.wizard'
    _description = '实例'

    name = fields.Char(string='名称',  default=lambda self: 'New')


    def button_ok(self):
        context = dict(self._context or {})
        active_id = context.get('active_id')
        active_model = context.get('active_model')
        obj = self.env[active_model].browse(active_id)
        raise ValidationError('你输入的值为：%s' % self.name)

        return True
